package io.itit.ecp.admin.provide.action.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.itit.grass.common.provide.action.validation.IAdd;
import io.itit.grass.common.provide.action.validation.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：碳排放规划配置参数
 * @Date：Create by 2024-01-11 16:45:38
 */
@Data
@ToString
@ApiModel("碳排放规划配置参数")
public class CarbonEmissionPlanReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @Null(groups = IAdd.class)
    @NotBlank(groups = IUpdate.class)
    @ApiModelProperty("主键")
    private String id;

    @NotBlank(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("项目Id")
    private String sceneProjectId;

    @NotBlank(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("楼栋Id")
    private String sceneEdificeId;

    @NotNull(groups = {IAdd.class, IUpdate.class})
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("生效开始日期")
    private Date effectiveTimeStart;

    @NotNull(groups = {IAdd.class, IUpdate.class})
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("生效结束日期")
    private Date effectiveTimeEnd;

    @NotBlank
    @ApiModelProperty("机构Id")
    private String deptId;

    @ApiModelProperty("规划详情列表")
    private List<CarbonEmissionPlanDetailReq> planDetailList;

}